home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Apple / Apple II TNs(Text).cpt / Apple II TNs(Text) / Mous / TN.Mous.006 < prev    next >
Encoding:
Text File  |  1989-11-15  |  6.2 KB  |  151 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6. Mouse
  7. #6:    MouseText Characters
  8.  
  9. Revised by:    Matt Deatherage                                   January 1989
  10. Revised by:    Rilla Reynolds                                   November 1985
  11.  
  12. This Technical Note describes the MouseText character set which is available 
  13. on all currently produced Apple II computers.
  14. Changed since November 1988:  Corrected typographical errors in the BASIC 
  15. and assembly language program examples.
  16. _____________________________________________________________________________
  17.  
  18. In unenhanced Apple IIe computers, the alternate character set contained two 
  19. sets of inverse uppercase characters.  In the enhanced Apple IIe, and in all 
  20. Apple IIc and IIGS computers, one set of inverse uppercase characters is 
  21. replaced by a MouseText character set.  MouseText is a set of graphical 
  22. characters designed to allow Apple II computers to display a desktop metaphor 
  23. on the text screen.  The Apple II Desktop Toolkit uses these characters, as do 
  24. applications like AppleLink-Personal Edition.
  25.  
  26. If your program used the set of inverse uppercase characters which were 
  27. replaced by MouseText (the set mapped to ASCII values $40-$5F), your program 
  28. will display MouseText characters instead of inverse uppercase characters on 
  29. all currently-produced Apple II computers.  If your program used the other set 
  30. of inverse uppercase characters (ASCII values $00-$1F), it will display 
  31. inverse capital characters as expected.
  32.  
  33. The following will help you identify if the changes affect you or not.
  34.  
  35. 1.    If your program is written entirely in BASIC or Pascal or your 
  36.       assembly language program calls the COUT routine to put characters 
  37.       on the screen, you are not affected.  The only exception would be 
  38.       if you print (POKE) inverse characters directly to the text screen 
  39.       in BASIC.
  40. 2.    If your program uses the standard character set (checkerboard 
  41.       cursor) you are not affected.
  42. 3.    If your program is using the alternate character set (solid 
  43.       cursor) and is directly storing values (via POKE) to the text 
  44.       display area, you will encounter problems if your character values 
  45.       are in the range from 64 ($40) to 95 ($5F).  To recreate the 
  46.       original display, use values in the range from 0 ($0) to 31 ($1F) 
  47.       instead.  Note that these lower values display as inverse 
  48.       uppercase characters on older machines as well.
  49.  
  50.  
  51. Following are the methods recommended for accessing MouseText characters from 
  52. various languages:
  53.  
  54. AppleSoft BASIC
  55.  
  56. 1.    Turn on the video firmware with PR#3 (if under DOS 3.3 or 
  57.       ProDOS, use PRINT CHR$(4);"PR#3")
  58. 2.    Enable MouseText characters by printing an ASCII 27 ($1B) to 
  59.       the screen.
  60. 3.    Set inverse printing mode by printing an ASCII 15 ($0F) to the 
  61.       screen.
  62.  
  63. To stop displaying MouseText  characters:
  64.  
  65. 1.    Disable MouseText characters by printing an ASCII 24 ($18) to 
  66.       the screen.
  67. 2.    Set normal print mode (if desired) by printing an ASCII 14 
  68.       ($0E) to the screen.
  69.  
  70. This short BASIC program displays all MouseText characters under DOS 3.3 and 
  71. ProDOS:
  72.  
  73.     10    D$=CHR$(4)
  74.     20    PRINT D$;"PR#3": REM Turn on the video firmware
  75.     30    PRINT:REM This is so the screen won't be in inverse
  76.     40    PRINT CHR$(15):REM Set inverse mode
  77.     50    PRINT CHR$(27);"ABCEDFGHIJKLMNOPQRSTUVWXYZ@[]^_\";CHR$(24)
  78.     60    PRINT CHR$(14):END
  79.  
  80. Assembly Language
  81.  
  82. Assembly language programs are expected to follow the same procedure as 
  83. AppleSoft BASIC.  Use calls to COUT to print MouseText characters to the 
  84. screen.  The following is a sample assembly language program which displays 
  85. two MouseText characters (which create a folder icon), along with their 
  86. inverse uppercase equivalents:
  87.  
  88. START        LDA #$A0           ;USE A BLANK SPACE TO
  89.              JSR $C300          ;TURN ON THE VIDEO FIRMWARE
  90.              LDY #0             ;INITIALIZE COUNTER
  91. LOOP         LDA STR,Y          ;GET VALUE
  92.              JSR $FDED          ;SEND IT THROUGH THE COUT ROUTINE
  93.              INY
  94.              CPY STRLEN
  95.              BNE LOOP           ;=>NOT DONE YET
  96.              RTS
  97. STR          DFB $1B,$58,$59,$18,$58,$59
  98.                                 ;MOUSETEXT ON, SHOW, MOUSETEXT OFF, SHOW
  99. STRLEN       EQU *-STR          ;LENGTH OF STR
  100.  
  101. Note:    Using MouseText on the text screen by directly poking or 
  102. storing MouseText character values into the text buffer is not 
  103. supported by Apple at this time.  Should the MouseText character 
  104. set require remapping in the future, those programs which use the 
  105. methods outlined in this Note should still work with any new 
  106. mapping.  Those which directly store MouseText values run the 
  107. strong risk of display failure under a new mapping.
  108.  
  109.  
  110. Apple II Pascal
  111.  
  112. 1.    Output a CHR(27), an escape character, to enable MouseText.
  113. 2.    Output a CHR(15) to turn on inverse video.
  114. 3.    Output the appropriate capital letter for the desired MouseText 
  115.       character.
  116.  
  117. A Pascal sample program:
  118.  
  119.     PROGRAM OUTPUT_MOUSETEXT
  120.     VAR CMD:PACKED ARRAY[0..1] OF 0..255
  121.     BEGIN
  122.         CMD[0]:=27; CMD[1]:=15;
  123.         UNITWRITE(1,CMD,2); {turn on MouseText mode}
  124.         {code to display MouseText
  125.                     .
  126.                     .
  127.                     .
  128.         }
  129.         CMD[0]:=24;
  130.         UNITWRITE(1,CMD,1); {turn off MouseText mode}
  131.     END
  132.  
  133. Pictorial descriptions of the MouseText character set may be found in the 
  134. Apple IIe Technical Reference Manual, the Apple IIc Technical Reference 
  135. Manual, and the Apple IIGS Hardware Reference.
  136.  
  137. Note:    The pictures of MouseText characters in these manuals differ 
  138. from early implementations.  In early MouseText character sets, 
  139. the icons mapped to the letters F and G combined to form a 
  140. "running man."  In current production, these letters are different 
  141. pictures (an inverse carriage return symbol and a window title bar 
  142. pattern) which form no picture when placed next to each other.  
  143. Programs should not attempt to use the running man MouseText 
  144. characters.
  145.  
  146.  
  147. Further Reference
  148. _____________________________________________________________________________
  149. o    Apple IIGS Hardware Reference
  150. o    Apple IIe Technical Reference Manual
  151. o    Apple IIc Technical Reference Manual